Recent advances in computer performance have enabled graphic systems to provide more realistic graphical images using personal computers and home video game computers. In such graphic systems, some procedure must be implemented to “render” or draw graphic primitives to the screen of the system. A “graphic primitive” is a basic component of a graphic picture, such as a polygon, e.g., a triangle, or a vector. All graphic pictures are formed with combinations of these graphic primitives. Many procedures may be utilized to perform graphic primitive rendering.
Texture mapping schemes were developed to enhance the images rendered by early graphics systems. Early graphic systems displayed images representing objects having extremely smooth surfaces. That is, textures, bumps, scratches, or other surface features were not modeled. In order to improve the quality of the image, texture mapping was developed to model the complexity of real world surface images. In general, texture mapping is the mapping of an image or a function onto a surface in three dimensions. For example, the texture would be a picture of whatever material the designer was trying to convey (e.g., brick, stone, vegetation, wood, etc.) and would contain shading information as well as the texture and color to create the impression of a complex, 3D surface. Texture mapping is now widely established and widely implemented in most computer graphics systems.
“MIP mapping” is a texturing technique that is widely used to improve the visual quality of texture mapped graphics and animations. A primary objective of MIP mapping is to improve the overall impression of depth a viewer perceives in a given 3D scene. Since a display (e.g., CRT monitor, LCD monitor, etc.) is a flat 2D surface, it can be difficult to create the impression of depth.
A computer graphics rendering system achieves the impression of depth by displaying objects or scenery in a smaller size as distance from the camera viewpoint increases. However, when an object gets too small, the texture mapping methods are no longer able to display all its details. When this happens, some details are skipped, and visual information is lost. Rendering artifacts occur, such as, for example, jagged edges, interference patterns known as moiré, and the like. MIP mapping techniques are configured to address these problems.
MIP mapping prevents moiré and improves antialiasing by manipulating these texture maps. The texture maps generally contain all the surface details of the objects. MIP mapping adjusts the level of detail (LOD) of the texture maps by scaling and filtering a texture map into multiple versions before applying it to the wire frame model (e.g., referred to as LOD filtering). These versions are of varying resolution and detail. At close distances to the camera viewpoint, the texture map appears in its original full detail. For medium distances, a smaller texture (e.g., half the resolution of the original) is used. Even further distances display texture maps that are a quarter the resolution and so on. Each of these stages is known as a MIP map level. By choosing the appropriate texture map resolution and detail, MIP mapping ensures pixels do not get lost at further distances. Instead, properly averaged smaller versions of the original texture map are used.
Prior art MIP mapping is not well suited for cube mapping graphics applications. MIP mapping can adequately adjust the level of detail of a texture mapping operation in most of 3-D rendering applications. However, certain types of “environment” operations are not suited to prior art MIP mapping. Environment operations, or environment mapping, refer to those applications where details of an object's environment are reflected off of the object's surface. For example, a chrome object having a highly reflective surface should properly reflect its surrounding environment when rendered.
Cube mapping is one widely used mechanism for implementing environment mapping. Cube mapping is a well-known form of texture mapping that uses 3D normal vectors of an object's surface to index a cube map comprising six square 2D textures, arranged like the faces of a cube. Generally, the environment around an object is captured by six photographs (e.g. textures), each at an orthogonal 90 degree view from the others, thereby capturing a 360 degree view of the object's surroundings. Texels from the six texture maps are mapped onto the surface of the object to create the reflections of the environment.
Prior art MIP mapping is prone to LOD errors when used in cube mapping applications. Prior art MIP mapping uses point sampling techniques to determine when it is appropriate to shift from a higher level of detail texture map to a lower level of detail texture map, and vice versa. The point sampling generally detects the distance between adjacent samples to determine when a shift is required (e.g., by computing the Euclidean distance between samples). This point sampling technique however is not sufficiently accurate for cube mapping. This is due in part to the fact that the prior art point sampling techniques do not account for the 3D nature of the cube map (e.g., the six textures on the cube faces).
The prior art distance computing mechanism does not function properly when samples are on different faces of the cube. This results in incorrect LOD parameters used in the MIP mapping process, which in turn, results in rendering artifacts and rendering errors (e.g., aliased jagged edges, moiré interference patterns, etc.).